/* IP Query Service Stylesheets */
/* Modern CSS for IP Query Application */

:root {
  --primary-color: #4a6bea;
  --secondary-color: #45c091;
  --dark-color: #333333;
  --light-color: #ffffff;
  --background-color: #f5f7fb;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "微软雅黑", "Microsoft Yahei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--dark-color);
  line-height: 1.6;
  padding: 0;
  margin: 0;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--light-color);
  padding: 2rem 0;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-align: center;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
  width: fit-content;
  margin: 2rem auto;
}

.card {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

form {
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

input[type="text"],
input[type="file"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="file"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(74, 107, 234, 0.2);
}

button {
  background-color: var(--primary-color);
  color: var(--light-color);
  border: none;
  border-radius: var(--border-radius);
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-end;
}

button:hover {
  background-color: #3951be;
  transform: translateY(-2px);
}

.divider {
  height: 1px;
  background-color: #eee;
  margin: 2rem 0;
}

.result-container {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

pre {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  font-family: Consolas, Monaco, 'Andale Mono', monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  border: 1px solid #eee;
}

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.back-link:before {
  content: "←";
  margin-right: 0.5rem;
}

.back-link:hover {
  color: var(--secondary-color);
  transform: translateX(-5px);
}

footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 2rem;
  color: #888;
  font-size: 0.9rem;
}

/* IP信息卡片样式 */
.ip-info-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid #eee;
}

.ip-header {
  background: linear-gradient(to right, #3a7bd5, #3a6073);
  color: #fff;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.ip-header i {
  margin-right: 0.8rem;
  font-size: 1.4rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.info-item {
  padding: 0.8rem;
  border-radius: var(--border-radius);
  background-color: #f9f9f9;
  transition: var(--transition);
}

.info-item:hover {
  background-color: #f0f4ff;
  transform: translateY(-2px);
}

.info-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
}

.info-label i {
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

.info-value {
  color: #444;
  padding-left: 1.8rem;
}

.file-hint {
  font-size: 0.9rem;
  color: #888;
  margin-top: -1rem;
  margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
}
